<?php/**
 * 登录
 */?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>登陆</title>
    <script>
        function init(){
            if(myform.username.value=="")
            {
                alert("请输入用户名");
                //将光标移动到文本框中
                myform.username.focus();
                return false;
            }
            if (myform.userpwd.value=="")
            {
                alert("请输入密码");
                myform.userpwd.focus();
                return false;
            }
            if (myform.code.value=="")
            {
                alert("请输入验证码");
                myform.code.focus();
                return false;
            }
        }
    </script>
    <style type="text/css">
        .code{
            width:80px;
            height: 30px;
            font-size:20px;
        }
        .titl{
            height: 50px;
            font-weight:bold;
            font-size:20px;
            position:relative;
            /*left:100px;*/
        }
        .f1{
            margin-top: 10px;
            margin-left: 20px;
            height: 40px;
            font-size:20px;
        }
        .f11{
            top:20px;
            height: 30px;
            width:200px;
            font-size:20px;
        }
        .f3{
            padding-top:5px;
            font-size:20px;
        }
    </style>
</head>
<body>
<form action="logincheck.php" method="post" onsubmit="return init();" name="myform" >
    <table id="tbl" border=1 width=300 border="0" frame=void rules=none>
        <tr frame=void>
            <td class="titl"  align="center" colspan="3">用户登录</td>
        </tr>
        <tr >
            <td width=30% align="right"><span >用户名:</span></td>
            <td colspan="2" class="f11"><span ><input class="f11" type="text" name="username" id="username" placeholder="请输入用户名" /></span></td>
        </tr>
        <tr>
            <td width=30% align="right"><span >密  码:</span></td>
            <td colspan="2"><span><input class="f11" type="password"  name="userpwd" id="userpwd" placeholder="请输入密码" ></span></td>
        </tr>
        <tr frame=void>
            <td width=30% align="right"><span >验证码:</span></td>
            <td><span><input  type="text" name="code" class="code" id="code" placeholder="验证码">
                </span>
            </td>
            <td><span>
                    <img src="img.php"  class="f3" onClick="this.src='img.php?nocache='+Math.random()" style="cursor:pointer">
                </span>
            </td>
        </tr>
        <tr >
            <td align="center" colspan="3" class="f11" frame=void>
                <span><button class="f1" >登录</button></span>
                <span ><a href="register.php" >注册</a></span>
            </td>
        </tr>
    </table>
    <span><input  type = "hidden" name = "hidden"  value = "hidden"  /></span>
</form>
</body>
</html>